package cn.mulanbay.auth;

import cn.mulanbay.business.listener.StartListener;
import cn.mulanbay.business.listener.StopListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;

/**
 * 认证授权中心
 *
 * @author fenghong
 * @create 2022-01-16 10:00
 */
@EnableFeignClients(basePackages="cn.mulanbay.api.system")
@SpringBootApplication(scanBasePackages = "cn.mulanbay.auth")
public class MulanbayAuthApplication {

    private static final Logger logger = LoggerFactory.getLogger(MulanbayAuthApplication.class);

    public static void main(String[] args) {
        SpringApplication sa = new SpringApplication(MulanbayAuthApplication.class);
        sa.addListeners(new StartListener());
        sa.addListeners(new StopListener());
        sa.run(args);
        logger.info("认证授权中心启动成功");
    }
}
